<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo02-parent-and-child</title>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

</head>
<body>
    
    <div id="app">

        <p1></p1>
    </div> 



</body>
</html>


<script>

var c = Vue.extend({
    template: `<div>
        <h3>通用标题2-子标题</h3>
        <span>333</span>
    </div>`
});


var p1 = Vue.extend({
    template: `<div>
        <h1>通用标题-主标题</h1>
        <span>111</span>
        <c1></c1>
    </div>`,
    components:{
        c1 : c
    }
});




var app = new Vue({
  el: '#app',
  data: {
  },
  methods:{
  },
  components:{
      p1:p1
  }
})
</script>